/**
 * Created by Administrator on 2017/10/13.
 */
export default {

  namespace: 'layout',

  state: {
    //选中的模块
    tabBar: 'infor'
  },

  subscriptions: {
    setup({ dispatch, history }) {
      history.listen(({pathname, query}) => {
        
      })
    }
  },

  effects: {
    *fetch({payload}, { call, put, select }) {

    },
    // 保存用户当前模块
    *saveTabBar({payload}, { call, put, select }) {
      yield put({
        type: 'success',
        payload: payload
      })
    }
  },

  reducers: {
    success(state, action){
      return {...state, ...action.payload};
    }
  }
};
